<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script type="text/javascript">
    var arr = [1, 2, 3, 4];
    // 希望可以将数组中的元素求取平方
    // [1, 4, 9, 16]
    var rs = [];
    for (var i = 0; i < arr.length; i++) {
        rs.push( arr[i] * arr[i] );
    }
    console.log(rs);



</script>

</html>
